package com.qqtech.qquan.mall.dao;

import java.math.BigDecimal;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.qquan.mall.model.MallCart;
import com.qqtech.qquan.mall.model.MallCartQuery;
import com.qqtech.qquan.mall.model.MallCartVo;

public interface MallCartDao extends BaseDao<MallCart> {
	/**
     * 购物车商品数量
     * @param userId
     * @param shopId
     * @return
     */
    int getTotalQuantity(Integer userId, Integer shopId);
    /**
     * 购物车商品价格总计
     * @param userId
     * @param shopId
     * @return
     */
    BigDecimal getTotalPrice(Integer userId, Integer shopId);
    
    /**
	 * 根据供应商查询购物车列表(商城)
	 * 
	 * @param query
	 * @param pageable
	 * @return
	 */
	public Page<MallCartVo> queryPageBySupplier(MallCartQuery query, Pageable pageable);
	
	/**
	 * 根据供应商查询购物车数量(商城)
	 * 
	 * @param query
	 * @return
	 */
	public int queryCountBySupplier(MallCartQuery query);
	
	 /**
	 * 根据店铺查询购物车列表(圈商)
	 * 
	 * @param query
	 * @param pageable
	 * @return
	 */
	public Page<MallCartVo> queryPageByShop(MallCartQuery query, Pageable pageable);
	/**
	 * 根据店铺查询购物车数量(圈商)
	 * 
	 * @param query
	 * @return
	 */
	public int queryCountByShop(MallCartQuery query);
}
